﻿using System.Collections.Generic;
using TFramework.ECS.Blueprint;
using TFramework.ECS.Entity;
using TFramework.ECS.Group;
using TFramework.ECS.Group.Observable;

namespace TFramework.ECS.Collection
{
    public interface IEntityCollection : IReadOnlyList<IEntity>
    {
        IEntity CreateEntity(IBlueprint blueprint = null, int? id = null);

        void AddEntity(IEntity entity);

        IEntity GetEntity(int id);

        bool ContainsEntity(int id);

        void RemoveEntity(int id, bool disposeOnRemoval = true);

        IEnumerable<IEntity> GetEntitiesFor(IGroup group);

        IObservableGroup GetObservableGroup(IGroup group);
    }
}
